#include<bits/stdc++.h>
using namespace std;
const int N=2e5;
int a[N],b[N],c[N],v[N];
int main(){
	int t,n;
	cin>>t;
	while(t--)
	{
        memset(v,0,sizeof(v));
		int flg=0,flg2=0,maxn=0;
		cin>>n;
		for(int i=1;i<=n;i++)
			cin>>a[i];
		for(int i=1;i<=n;i++)
			cin>>b[i];		
		for(int i=1;i<=n;i++)
		{
			if(a[i]<b[i]) 
			{
				flg=1;break;
			}
            if(b[i]==0) v[i]=1;
			c[i]=a[i]-b[i];
            maxn=max(maxn,c[i]);
		}
		if(flg==1)
		{
			cout<<"NO"<<endl;
			continue;
		}
		for(int i=1;i<=n;i++)
		{
			if(c[i]<maxn&&v[i]==0) {flg2=1;break;}
		}	 
		if(flg2==1) cout<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
	
	
	return 0;
}
